package dk.ucn.cm.builder;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class StartScreen extends Activity implements View.OnClickListener
{
	Button newGame;
	Button savedGame, test, testDonut, testNewDonut;

	@Override
	protected void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_start_screen);
		
		letsSeeTheButtons();
		
		newGame.setOnClickListener(this);
		savedGame.setOnClickListener(this);	
		test.setOnClickListener(this);
		testDonut.setOnClickListener(this);
		testNewDonut.setOnClickListener(this);
		
		
		
	}

	
	private void letsSeeTheButtons()
	{
		newGame = (Button)findViewById(R.id.bNewGame);
		savedGame = (Button)findViewById(R.id.bChooseSavedGame);
		test = (Button)findViewById(R.id.bTest);
		testDonut = (Button)findViewById(R.id.bTestdonut);
		testNewDonut = (Button)findViewById(R.id.bTestNewdonut);
	}
	
	@Override
	public void onClick(View view) 
	{
		// TODO Auto-generated method stub
		switch(view.getId())
		{
		case R.id.bNewGame:
			Intent newGame = new Intent(this, GameBoard.class);
			startActivity(newGame);
			break;
			
		case R.id.bChooseSavedGame:
			Intent savedGame = new Intent(this, GameBoard.class);
			startActivity(savedGame);
			break;
			
		case R.id.bTest:
			Intent test = new Intent(this, GameBoard_new.class);
			startActivity(test);
			break;
			
		case R.id.bTestdonut:
			Intent testDonut = new Intent(this, DonutGraph.class);
			startActivity(testDonut);
			break;
		case R.id.bTestNewdonut:
			Intent testNewDonut = new Intent(this, GameBoardDonut.class);
			startActivity(testNewDonut);
		}
	}}


